package com.onehouse.domain.checkIn.model.entity;

import com.onehouse.domain.checkIn.model.valobj.Customer;
import com.onehouse.domain.checkIn.model.valobj.Room;
import com.onehouse.domain.checkIn.model.valobj.RoomPriceMap;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CheckInRoom {

    private String checkInRoomId; //入住子单
    private LocalDate checkInDate;
    private LocalDate checkOutDate;
    private Room room;
    private ArrayList<Customer> customerList;
    private CheckInBill checkInBill;

    public void refreshBill(RoomPriceMap roomPriceMap){
        this.checkInBill.caculate(this.checkInDate, this.checkOutDate, roomPriceMap);
    }

}
